package com.ptszyxx.popose.common.utils;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.fragment.app.FragmentActivity;
import com.ptszyxx.popose.common.constants.AppConstant;
import com.ptszyxx.popose.common.constants.BundleConstant;
import com.ptszyxx.popose.common.enums.EditEnum;
import com.ptszyxx.popose.common.enums.MainTabEnum;
import com.ptszyxx.popose.common.enums.MessageNoticeEnum;
import com.ptszyxx.popose.common.enums.MineFollowTabEnum;
import com.ptszyxx.popose.module.base.login.LoginBindActivity;
import com.ptszyxx.popose.module.base.login.LoginCodeWorldActivity;
import com.ptszyxx.popose.module.base.password.PasswordForgetActivity;
import com.ptszyxx.popose.module.base.password.PasswordFragment;
import com.ptszyxx.popose.module.base.user.UserAvatarFragment;
import com.ptszyxx.popose.module.base.user.UserBirthdayFragment;
import com.ptszyxx.popose.module.base.user.UserInfoImproveActivity;
import com.ptszyxx.popose.module.base.user.UserNickFragment;
import com.ptszyxx.popose.module.base.user.UserResultFragment;
import com.ptszyxx.popose.module.base.user.UserSexFragment;
import com.ptszyxx.popose.module.base.user.UserTagFragment;
import com.ptszyxx.popose.module.base.user.UserWechatFragment;
import com.ptszyxx.popose.module.base.user.vm.UserTagVM;
import com.ptszyxx.popose.module.base.web.WebViewActivity;
import com.ptszyxx.popose.module.base.web.WebViewPayActivity;
import com.ptszyxx.popose.module.main.expression.ExpressionFragment;
import com.ptszyxx.popose.module.main.game.GameCommentFragment;
import com.ptszyxx.popose.module.main.game.GameDetailFragment;
import com.ptszyxx.popose.module.main.home.HomeWorldDetailFragment;
import com.ptszyxx.popose.module.main.map.MapAddressFragment;
import com.ptszyxx.popose.module.main.report.ReportFragment;
import com.tencent.liteav.trtccalling.TUICalling;
import com.tencent.liteav.trtccalling.TUICallingImpl;
import com.ysg.base.BaseApplication;
import com.ysg.enums.ChatCallEnum;
import com.ptszyxx.popose.module.chat.page.ChatFragment;
import com.ptszyxx.popose.module.chat.page.ChatSetFragment;
import com.ptszyxx.popose.module.main.dynamic.DynamicCommentFragment;
import com.ptszyxx.popose.module.main.dynamic.DynamicReleaseFragment;
import com.ptszyxx.popose.module.main.dynamic.DynamicReplyFragment;
import com.ptszyxx.popose.module.main.home.HomeCallMatchFragment;
import com.ptszyxx.popose.module.main.home.HomeRankFragment;
import com.ptszyxx.popose.module.main.home.HomeSearchFragment;
import com.ptszyxx.popose.module.main.message.MessageNoticeDetailsFragment;
import com.ptszyxx.popose.module.main.message.MessageNoticeFragment;
import com.ptszyxx.popose.module.main.mine.MineAccountFragment;
import com.ptszyxx.popose.module.main.mine.MineAgreementFragment;
import com.ptszyxx.popose.module.main.mine.MineCharmFragment;
import com.ptszyxx.popose.module.main.mine.MineDiamondFragment;
import com.ptszyxx.popose.module.main.mine.MineDynamicFragment;
import com.ptszyxx.popose.module.main.mine.MineExchangeFragment;
import com.ptszyxx.popose.module.main.mine.MineExchangeRecordFragment;
import com.ptszyxx.popose.module.main.mine.MineFollowFragment;
import com.ptszyxx.popose.module.main.mine.MineInViteFragment;
import com.ptszyxx.popose.module.main.mine.MineLookFragment;
import com.ptszyxx.popose.module.main.mine.MinePriceFragment;
import com.ptszyxx.popose.module.main.mine.MineRealFragment;
import com.ptszyxx.popose.module.main.mine.MineShopFragment;
import com.ptszyxx.popose.module.main.mine.MineShopMyFragment;
import com.ptszyxx.popose.module.main.mine.MineTaskFragment;
import com.ptszyxx.popose.module.main.tea.TeaReleaseFragment;
import com.ptszyxx.popose.module.main.trip.TripDetailFragment;
import com.ptszyxx.popose.module.main.trip.TripReleaseFragment;
import com.ptszyxx.popose.module.main.user.UserEditFragment;
import com.ptszyxx.popose.module.main.user.UserEditLabelFragment;
import com.ptszyxx.popose.module.main.user.UserEditContentFragment;
import com.ptszyxx.popose.module.main.user.UserEditVoiceFragment;
import com.ptszyxx.popose.module.main.user.UserGuardFragment;
import com.ptszyxx.popose.module.test.TestFragment;
import com.ysg.http.data.entity.dynamic.CommentEntity;
import com.ptszyxx.popose.module.main.mine.MineRechargeFragment;
import com.ptszyxx.popose.module.main.mine.MineSetFragment;
import com.ptszyxx.popose.module.main.mine.MineVipFragment;
import com.ptszyxx.popose.module.main.mine.MineWalletFragment;
import com.ptszyxx.popose.module.main.user.UserDetailFragment;
import com.ptszyxx.popose.module.main.user.UserSetFragment;
import com.ysg.base.BaseViewModel;
import com.ptszyxx.popose.module.base.login.LoginActivity;
import com.ptszyxx.popose.module.base.register.RegisterActivity;
import com.ptszyxx.popose.module.main.MainActivity;
import com.ysg.http.data.entity.game.GameEntity;
import com.ysg.http.data.entity.trip.TripEntity;
import com.ysg.utils.YAppUtil;
import com.ysg.utils.YStringUtil;

public class YActivityUtil {
    private static YActivityUtil instance;

    private YActivityUtil(){
    }

    public static YActivityUtil getInstance(){
        if (instance == null){
            synchronized (YActivityUtil.class){
                if (instance == null){
                    instance = new YActivityUtil();
                }
            }
        }
        return instance;
    }

    /**
     * 关闭
     */
    public void close(BaseViewModel viewModel){
        viewModel.finish();
    }
    /**
     * 关闭
     */
    public void close(FragmentActivity activity){
        activity.finish();
    }

    /**
     * 注册
     */
    public void jumpRegister(BaseViewModel viewModel){
        viewModel.startActivity(RegisterActivity.class);
    }

    /**
     * 登录页
     */
    public void jumpLoginQuickActivity(Context context){
//        Intent intent = new Intent(context, LoginQuickActivity.class);
        Intent intent = new Intent(context, LoginCodeWorldActivity.class);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);
    }

    /**
     * 登录页
     */
    public void jumpLoginActivity(BaseViewModel viewModel){
        viewModel.startActivity(LoginActivity.class);
    }
    /**
     * 验证码登录
     */
    public void jumpLoginCode(BaseViewModel viewModel){
        viewModel.startActivity(LoginCodeWorldActivity.class);
        close(viewModel);
    }

    /**
     * 首页
     */
    public void jumpMainActivity(BaseViewModel viewModel, String txUserId, String nick, String userIcon){
        Bundle bundle = new Bundle();
        if (YStringUtil.isNotEmpty(txUserId)){
            bundle.putString(BundleConstant.CHAT_USER_ID, txUserId);
        }
        if (YStringUtil.isNotEmpty(nick)){
            bundle.putString(BundleConstant.CHAT_USER_NAME, nick);
        }
        if (YStringUtil.isNotEmpty(userIcon)){
            bundle.putString(BundleConstant.CHAT_USER_PIC, userIcon);
        }
        viewModel.startActivity(MainActivity.class, bundle);
    }

    /**
     * 首页
     */
    public void jumpMainActivity(BaseViewModel viewModel, MainTabEnum tabEnum){
        Bundle bundle = new Bundle();
        if (tabEnum != null){
            bundle.putString(BundleConstant.TAB, tabEnum.getName());
        }
        viewModel.startActivity(MainActivity.class, bundle);
    }

    /**
     * 忘记密码
     */
    public void jumpPasswordForget(BaseViewModel viewModel){
        viewModel.startActivity(PasswordForgetActivity.class);
    }
    /**
     * 绑定手机号
     */
    public void jumpLoginBind(BaseViewModel viewModel, String thirdType, String thirdToken){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.THIRD_TYPE, thirdType);
        bundle.putString(BundleConstant.THIRD_TOKEN, thirdToken);
        viewModel.startActivity(LoginBindActivity.class, bundle);
    }

    /**
     * 完善用户信息
     */
    public void jumpUserInfoImprove(BaseViewModel viewModel){
        viewModel.startContainerActivity(UserNickFragment.class);
    }

    /**
     * 完善用户信息-昵称
     */
    public void jumpUserNick(BaseViewModel viewModel){
        viewModel.startContainerActivity(UserNickFragment.class);
        close(viewModel);
    }
    /**
     * 完善用户信息-生日
     */
    public void jumpUserBirthday(BaseViewModel viewModel){
        viewModel.startContainerActivity(UserBirthdayFragment.class);
        close(viewModel);
    }
    /**
     * 完善用户信息-
     */
    public void jumpUserSex(BaseViewModel viewModel, String birthday){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.USER_BIRTHDAY, birthday);
        viewModel.startContainerActivity(UserSexFragment.class, bundle);
        close(viewModel);
    }
    /**
     * 完善用户信息-
     */
    public void jumpUserAvatar(BaseViewModel viewModel){
        viewModel.startContainerActivity(UserAvatarFragment.class);
        close(viewModel);
    }

    /**
     * 完善用户信息-
     */
    public void jumpUserWechat(BaseViewModel viewModel){
        viewModel.startContainerActivity(UserWechatFragment.class);
        close(viewModel);
    }

    /**
     * 完善用户信息-
     */
    public void jumpUserTag(BaseViewModel viewModel){
        viewModel.startContainerActivity(UserTagFragment.class);
        close(viewModel);
    }
    /**
     * 完善用户信息-
     */
    public void jumpUserResult(BaseViewModel viewModel){
        viewModel.startContainerActivity(UserResultFragment.class);
        close(viewModel);
    }

    /**
     * 用户详情
     */
    public void jumpUserDetail(BaseViewModel viewModel, String userId){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.USER_ID, userId);
        viewModel.startContainerActivity(UserDetailFragment.class, bundle);
    }

    /**
     * 世界详情
     */
    public void jumpHomeWorldDetail(BaseViewModel viewModel, String userId){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.USER_ID, userId);
        viewModel.startContainerActivity(HomeWorldDetailFragment.class, bundle);
    }
    /**
     * 用户设置
     */
    public void jumpUserSet(BaseViewModel viewModel, String userId, String dynamicStatus){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.USER_ID, userId);
        bundle.putString(BundleConstant.DYNAMIC_STATUS, dynamicStatus);
        viewModel.startContainerActivity(UserSetFragment.class, bundle);
    }
    /**
     * 用户编辑
     */
    public void jumpUserEdit(BaseViewModel viewModel, String userId){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.USER_ID, userId);
        viewModel.startContainerActivity(UserEditFragment.class, bundle);
    }
    /**
     * 用户编辑-名称等等
     */
    public void jumpUserEditName(BaseViewModel viewModel, String userId, String content, EditEnum editEnum){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.USER_ID, userId);
        bundle.putString(BundleConstant.CONTENT, content);
        bundle.putString(BundleConstant.EDIT_TYPE, editEnum.getName());
        viewModel.startContainerActivity(UserEditContentFragment.class, bundle);
    }
    /**
     * 用户编辑-标签
     */
    public void jumpUserEditLabel(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(UserEditLabelFragment.class, bundle);
    }
    /**
     * 用户编辑-语音录制
     */
    public void jumpUserEditVoice(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(UserEditVoiceFragment.class, bundle);
    }

    /**
     * 聊天
     */
    public void jumpChat(BaseViewModel viewModel, String txUserId, String nick, String userIcon){
        Bundle bundle = new Bundle();
        if (YStringUtil.isAdmin(txUserId)){
            nick = AppConstant.CHAT_ADMIN_TITLE;
        }
        bundle.putString(BundleConstant.CHAT_USER_ID, txUserId);
        bundle.putString(BundleConstant.CHAT_USER_NAME, nick);
        bundle.putString(BundleConstant.CHAT_USER_PIC, userIcon);
        viewModel.startActivity(ChatFragment.class, bundle);
    }
    /**
     * 聊天
     */
    public void jumpChat(Context context, String txUserId, String nick, String userIcon){
        Intent intent = new Intent(context, ChatFragment.class);
        if (YStringUtil.isAdmin(txUserId)){
            nick = AppConstant.CHAT_ADMIN_TITLE;
        }
        intent.putExtra(BundleConstant.CHAT_USER_ID, txUserId);
        intent.putExtra(BundleConstant.CHAT_USER_NAME, nick);
        intent.putExtra(BundleConstant.CHAT_USER_PIC, userIcon);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        context.startActivity(intent);
    }

    /**
     * 动态发布
     */
    public void jumpDynamicRelease(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(DynamicReleaseFragment.class, bundle);
    }

    /**
     * 动态评论
     */
    public void jumpDynamicComment(BaseViewModel viewModel, String dynamicId){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.DYNAMIC_ID, dynamicId);
        viewModel.startContainerActivity(DynamicCommentFragment.class, bundle);
    }

    /**
     * 动态回复
     */
    public void jumpDynamicReply(BaseViewModel viewModel, CommentEntity entity){
        Bundle bundle = new Bundle();
        bundle.putParcelable(BundleConstant.ENTITY, entity);
        viewModel.startContainerActivity(DynamicReplyFragment.class, bundle);
    }
    /**
     * 设置
     */
    public void jumpMineSet(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineSetFragment.class, bundle);
    }
    /**
     * 钱包
     */
    public void jumpMineWallet(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineWalletFragment.class, bundle);
    }
    /**
     * 钻石充值
     */
    public void jumpMineRecharge(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startActivity(MineRechargeFragment.class, bundle);
    }
    /**
     * Vip
     */
    public void jumpMineVip(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startActivity(MineVipFragment.class, bundle);
    }

    /**
     * 关注
     */
    public void jumpMineFollow(BaseViewModel viewModel, MineFollowTabEnum tabEnum){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.TAB, tabEnum.getName());
        viewModel.startContainerActivity(MineFollowFragment.class, bundle);
    }
    /**
     * 谁看过我
     */
    public void jumpMineLook(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineLookFragment.class, bundle);
    }
    /**
     * 我的动态
     */
    public void jumpMineDynamic(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineDynamicFragment.class, bundle);
    }
    /**
     * 任务中心
     */
    public void jumpMineTask(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startActivity(MineTaskFragment.class, bundle);
    }
    /**
     * 实名认证
     */
    public void jumpMineReal(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineRealFragment.class, bundle);
    }
    /**
     * 邀请好友
     */
    public void jumpMineInvite(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineInViteFragment.class, bundle);
    }
    /**
     * 协议
     */
    public void jumpMineAgreement(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineAgreementFragment.class, bundle);
    }
    /**
     * 账户安全
     */
    public void jumpMineAccount(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineAccountFragment.class, bundle);
    }
    /**
     * 装扮商城
     */
    public void jumpMineShop(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineShopFragment.class, bundle);
    }
    /**
     * 我的装扮
     */
    public void jumpMineShopMy(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineShopMyFragment.class, bundle);
    }
    /**
     * 收费设置
     */
    public void jumpMinePrice(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MinePriceFragment.class, bundle);
    }
    /**
     * 魅力值明细
     */
    public void jumpMineCharm(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineCharmFragment.class, bundle);
    }
    /**
     * 钻石明细
     */
    public void jumpMineDiamond(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineDiamondFragment.class, bundle);
    }
    /**
     * 修改密码
     */
    public void jumpPassword(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(PasswordFragment.class, bundle);
    }
    /**
     * h5支付
     */
    public void jumpPay(BaseViewModel viewModel, String url, String payType){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.URL, url);
        bundle.putString(BundleConstant.PAY_TYPE, payType);
        viewModel.startContainerActivity(WebViewPayActivity.class, bundle);
    }

    /**
     * 通用web
     */
    public void jumpWeb(BaseViewModel viewModel, String url){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.URL, url);
        viewModel.startContainerActivity(WebViewActivity.class, bundle);
    }



    /**
     * 通话匹配：视频速配，语音速配
     */
    public void jumpHomeCallMatch(BaseViewModel viewModel, ChatCallEnum callEnum){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.CHAT_CALL_TYPE, callEnum.getType());
        viewModel.startContainerActivity(HomeCallMatchFragment.class, bundle);
    }

    /**
     * 排行榜
     */
    public void jumpHomeRank(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(HomeRankFragment.class, bundle);
    }

    /**
     * 聊天设置
     */
    public void jumpChatSet(BaseViewModel viewModel, String txUserId, String nick, String userIcon){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.CHAT_USER_ID, txUserId);
        bundle.putString(BundleConstant.CHAT_USER_NAME, nick);
        bundle.putString(BundleConstant.CHAT_USER_PIC, userIcon);
        viewModel.startContainerActivity(ChatSetFragment.class, bundle);
    }

    /**
     * 系统消息，平台消息
     */
    public void jumpMessageNotice(BaseViewModel viewModel, MessageNoticeEnum noticeEnum){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.TAB, noticeEnum.getName());
        viewModel.startContainerActivity(MessageNoticeFragment.class, bundle);
    }

    /**
     * 系统消息，平台消息
     */
    public void jumpMessageNoticeDetails(BaseViewModel viewModel, String content, MessageNoticeEnum noticeEnum){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.CONTENT, content);
        bundle.putString(BundleConstant.TAB, noticeEnum.getName());
        viewModel.startContainerActivity(MessageNoticeDetailsFragment.class, bundle);
    }

    /**
     * 用户协议
     */
    public void jumpAgreement(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.URL, AppConstant.url_user_agreement);
        viewModel.startContainerActivity(WebViewActivity.class, bundle);
    }
    /**
     * 隐私政策
     */
    public void jumpPrivacy(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.URL, AppConstant.url_privacy_policy);
        viewModel.startContainerActivity(WebViewActivity.class, bundle);
    }

    /**
     * 充值协议
     */
    public void jumpRechargeAgreement(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.URL, AppConstant.url_recharge_agreement);
        viewModel.startContainerActivity(WebViewActivity.class, bundle);
    }

    /**
     * 测试页
     */
    public void jumpTest(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(TestFragment.class, bundle);
    }
    /**
     * 守护列表
     */
    public void jumpGuard(BaseViewModel viewModel, String userId, String txUserId){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.USER_ID, userId);
        bundle.putString(BundleConstant.CHAT_USER_ID, txUserId);
        viewModel.startContainerActivity(UserGuardFragment.class, bundle);
    }

    /**
     * 发起约茶
     */
    public void jumpTeaRelease(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(TeaReleaseFragment.class, bundle);
    }
    /**
     * 旅游发布
     */
    public void jumpTripRelease(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(TripReleaseFragment.class, bundle);
    }
    /**
     * 旅游详情
     */
    public void jumpTripDetail(BaseViewModel viewModel, TripEntity entity){
        Bundle bundle = new Bundle();
        bundle.putParcelable(BundleConstant.ENTITY, entity);
        viewModel.startContainerActivity(TripDetailFragment.class, bundle);
    }

    /**
     * 首页搜索
     */
    public void jumpHomeSearch(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(HomeSearchFragment.class, bundle);
    }

    /**
     * 金币兑换钻石
     */
    public void jumpMineExchange(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineExchangeFragment.class, bundle);
    }
    /**
     * 兑换记录
     */
    public void jumpMineExchangeRecord(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(MineExchangeRecordFragment.class, bundle);
    }


    /**
     * 拨打电话
     */
    public void jumpChatCall(String txUserId, ChatCallEnum callEnum){
        TUICallingImpl mCallingImpl = (TUICallingImpl) TUICallingImpl.sharedInstance(BaseApplication.getContext());
        mCallingImpl.internalCall(new String[]{txUserId}, null, callEnum == ChatCallEnum.AUDIO? TUICalling.Type.AUDIO: TUICalling.Type.VIDEO, TUICalling.Role.CALL);
    }

    /**
     * 查看具体地址
     */
    public void jumpMapAddress(BaseViewModel viewModel, String userId, String userPic, String nick, String lat, String lng){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.LAT, lat);
        bundle.putString(BundleConstant.LNG, lng);
        bundle.putString(BundleConstant.USER_ID, userId);
        bundle.putString(BundleConstant.USER_PIC, userPic);
        viewModel.startContainerActivity(MapAddressFragment.class, bundle);
    }

    /**
     * 门票
     */
    public void jumpTicketDialog(boolean showFree){
        Intent intent = new Intent();
        intent.putExtra(BundleConstant.PAY_FREE, showFree);
        intent.setAction(YAppUtil.getPackageName() + ".ticket.dialog");//清单文件中
        intent.addCategory(Intent.CATEGORY_DEFAULT);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        BaseApplication.getContext().startActivity(intent);
    }

    /**
     * 实名认证
     */
    public void jumpRealDialog(){
        Intent intent = new Intent();
        intent.setAction(YAppUtil.getPackageName() + ".real.dialog");//清单文件中
        intent.addCategory(Intent.CATEGORY_DEFAULT);
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        BaseApplication.getContext().startActivity(intent);
    }

    /**
     * 游戏详情
     */
    public void jumpGameDetail(BaseViewModel viewModel, GameEntity entity){
        Bundle bundle = new Bundle();
        bundle.putParcelable(BundleConstant.ENTITY, entity);
        viewModel.startContainerActivity(GameDetailFragment.class, bundle);
    }
    /**
     * 游戏评论
     */
    public void jumpGameComment(BaseViewModel viewModel, GameEntity entity){
        Bundle bundle = new Bundle();
        bundle.putParcelable(BundleConstant.ENTITY, entity);
        viewModel.startContainerActivity(GameCommentFragment.class, bundle);
    }

    /**
     * 自定义常用语
     */
    public void jumpExpression(BaseViewModel viewModel){
        Bundle bundle = new Bundle();
        viewModel.startContainerActivity(ExpressionFragment.class, bundle);
    }

    /**
     * 举报
     */
    public void jumpReport(BaseViewModel viewModel, String userId){
        Bundle bundle = new Bundle();
        bundle.putString(BundleConstant.USER_ID, userId);
        viewModel.startContainerActivity(ReportFragment.class, bundle);
    }

}
